package com.clstu.qqcommon;

import java.io.Serializable;

/**
 * 一个消息类
 */
public class Message implements Serializable {
    private static final long serialVersionUID = 1L;
    private String sender;//发送者
    private String getter;//接收者
    private String content;//内容
    private String sentTime;//发送时间
    private String mesType;//消息类型[可以在接口中定义消息类型][默认:1成功 2失败]
    private String fileName;//文件名(路径)
    private String destPath;//目标路径
    private User user;//注册是需要的用户信息
    private byte[] data = null;//文件二进制数据

    public Message(String sentTime, String mesType, User user) {
        this.sentTime = sentTime;
        this.mesType = mesType;
        this.user = user;
    }

    public Message(String sender, String getter, String content, String sentTime, String mesType) {
        this.sender = sender;
        this.getter = getter;
        this.content = content;
        this.sentTime = sentTime;
        this.mesType = mesType;
    }

    public Message(String sender, String getter, String content, String sentTime, String mesType, String fileName, String destPath, byte[] data) {
        this.sender = sender;
        this.getter = getter;
        this.content = content;
        this.sentTime = sentTime;
        this.mesType = mesType;
        this.fileName = fileName;
        this.destPath = destPath;
        this.data = data;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getDestPath() {
        return destPath;
    }

    public void setDestPath(String destPath) {
        this.destPath = destPath;
    }

    public Message() {

    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getGetter() {
        return getter;
    }

    public void setGetter(String getter) {
        this.getter = getter;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSentTime() {
        return sentTime;
    }

    public void setSentTime(String sentTime) {
        this.sentTime = sentTime;
    }

    public String getMesType() {
        return mesType;
    }

    public void setMesType(String mesType) {
        this.mesType = mesType;
    }
}
